//
//  UIView+Frame.m
//  BuDeJie
//
//  Created by sunny on 16/4/1.
//  Copyright © 2016年 sunny. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
- (void)setGq_x:(CGFloat)gq_x
{
    CGRect rect = self.frame;
    rect.origin.x = gq_x;
    self.frame = rect;
}
- (CGFloat)gq_x
{
    return self.frame.origin.x;
}

- (void)setGq_y:(CGFloat)gq_y
{
    CGRect rect = self.frame;
    rect.origin.y = gq_y;
    self.frame = rect;
}
-(CGFloat)gq_y
{
    return self.frame.origin.y;
}

- (void)setGq_width:(CGFloat)gq_width
{
    CGRect rect = self.frame;
    rect.size.width = gq_width;
    self.frame = rect;
}
-(CGFloat)gq_width
{
    return self.frame.size.width;
}

- (void)setGq_height:(CGFloat)gq_height
{
    CGRect rect = self.frame;
    rect.size.height = gq_height;
    self.frame = rect;
}
-(CGFloat)gq_height
{
    return self.frame.size.height;
}

- (CGFloat)gq_centerX
{
    return self.center.x;
}
- (void)setGq_centerX:(CGFloat)gq_centerX
{
    CGPoint center = self.center;
    center.x = gq_centerX;
    self.center = center;
}

- (CGFloat)gq_centerY
{
    return self.center.y;
}
- (void)setGq_centerY:(CGFloat)gq_centerY
{
    CGPoint center = self.center;
    center.y = gq_centerY;
    self.center = center;
}
@end
